import Vue from 'vue'
import Vuex from 'vuex'
import { TaskNode, TaskNodeStore } from "vue-task-node";
import "vue-task-node/dist/css/vnode.css";

Vue.use(TaskNode);
Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    count: 0
  },
  getters: {
    getCount: state => {
      return state.count
    }
  },
  mutations: {
    increment (state) {
      state.count++
    }
  },
  actions: {
    increment ({ commit }) {
      return window.setInterval(function(){
        console.log('fdsfdsfsd')
        commit('increment')
      },3000);	
    }
  },
  modules: {
    TaskNodeStore
  }
})

export default store;